﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameEngine;

namespace DaphneProfiBase
{
    /// <summary>
    /// Notifying messages accross the Daphne Profi Software using Messenger
    /// </summary>
    public static class Notify
    {
        // Application Commands
        public static string SetGameManager = "SetGameManager";
        public static string PDNTagUpdated = "PDNTagUpdated";
        public static string SettingLanguage = "SettingLanguage";
        public static string ShowPanel = "ShowPanel";
        public static string PDNGameLibGenerateColumns = "PDNGameLibGenerateColumns";
        public static string PDNGameLibLoaded = "PDNGameLibLoaded";
        public static string PDNGameLibAddColumn = "PDNGameLibAddColumn";
        public static string PDNGameLibDelColumn = "PDNGameLibDelColumn";
        public static string PDNFileLoaded = "PDNFileLoaded";
        public static string InvalidateVisual = "InvalidateVisual";
        public static string SaveGameFormClose = "SaveGameFormClose";
        public static string CloseForm = "NewGameFormClose";
        public static string SetPresenter = "SetPresenter";
        public static string NewGame = "NewGame";
        public static string OpenGameFromGameList = "OpenGameFromGameList";
        public static string SetIsActiveBoard = "SetIsActiveBoard";
        public static string RedrawCheckersBoard = "RedrawCheckersBoard";
        public static string ExitRunMatchForm = "ExitRunMatchForm";
        public static string RunEngineMatch = "RunEngineMatch";
        public static string EngineMatchInfo = "EngineMatchInfo";
        public static string NoEngineMatchInfo = "NoEngineMatchInfo";
        public static string CloseCheckersBoard = "CloseCheckersBoard";
        public static string EditorCommand = "EditorCommand";
        public static string SetEditorState = "SetEditorState";
        public static string ResetDataGrid = "ResetDataGrid";
        public static string GlobalCommand = "GlobalCommand";

        // Global SubCommands
        public const string ReplayGame = "ReplayGame";
        public const string RotateBoard = "RotateBoard";
        public const string SwitchPlayerMode = "SwitchPlayerMode";
        public const string StartEditMode = "StartEditMode";
        public const string AdviceMove = "AdviceMove";
        public const string MoveNow = "MoveNow";

        // Editor subcommands
        public const string StartEditing = "StartEditing";
        public const string SetStartPositon = "SetStartPositon";
        public const string ClearCheckersBoard = "ClearCheckersBoard";
        public const string PositionUndo = "PositionUndo";
        public const string PositionRedo = "PositionRedo";
        public const string ParseFEN = "ParseFEN";
        public const string SetSideToMove = "SetSideToMove";
        public const string ApprovePosition = "ApprovePosition";
        public const string CancelEditing = "CancelEditing";
    }

    /// <summary>
    /// Editor Command Container Class - messages from Positon Editor to the active CheckersBoard
    /// </summary>
    public class EditorCommand
    {
        public string SubCommand
        { get; set; }

        public enumFigureColor SideToMove
        { get; set; }

        public string FEN
        { get; set; }
    }

    /// <summary>
    /// Command class - for notification from the current CheckersBoard to the Editor Pane
    /// </summary>
    public class EditorStateCommand
    {
        public bool IsInEditMode
        { get; set; }

        public bool UndoEnabled
        { get; set; }

        public bool RedoEnabled
        { get; set; }

        public enumFigureColor SideToMove
        { get; set; }
    }

    /// <summary>
    /// Global Command Container Class
    /// </summary>
    public class GlobalCommandInfo
    {
        public string SubCommand
        { get; set; }
    }
}
